package 数组.执行操作后的变量值2011;

public class Solution {
    public int finalValueAfterOperations(String[] operations) {
        int x = 0;
        for (String num : operations) {
            if(num.equals("++X") || num.equals("X++")){
                x ++;
            }else{
                x --;
            }
        }
        return x;
    }
}
